package com.mmall.common;

/**
 * 后端返回到前端的响应对象的状态信息
 * Created by qezhhnjy on 2017/9/22-14:49.
 */
public enum ResponseInfo {
    SUCCESS(0, "success"),
    ERROR(1, "error"),
    NEED_LOGIN(10, "need_login"),
    ILLEGAL_ARGUMENT(2, "illegal_argument");

    private final int code;
    private final String description;

    ResponseInfo(int code, String desc) {
        this.code = code;
        this.description = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}
